package com.region.loadbalancer.monitor.event;

import com.region.loadbalancer.group.GroupServer;

/**
 * Deal with the incident immediately
 *
 * @author liujieyu
 * @date 2023/5/26 23:55
 * @desciption
 */
public class PromptlyEvent extends AbstractEvent {

    GroupServer groupServer;

    public PromptlyEvent(GroupServer groupServer) {
        super(groupServer);
        this.groupServer = groupServer;
    }

    @Override
    public EventState state() {
        return EventState.NOW;
    }

    @Override
    public void event(GroupServer groupServer) {
        groupServer.getManager().fullDetectServer(groupServer);
    }

}
